package com.lgc.webtest.dao.second;

import com.lgc.webtest.entity.domain.AccountDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface AccountDao {

    AccountDO getAccount(@Param("userId") String userId);

    int insertAccount(AccountDO account);

    /**
     * 增加积分
     * @param userId
     * @param amount
     * @return
     */
    int addBalance(@Param("userId") String userId, @Param("amount") int amount);

    /**
     * 减积分
     * @param userId
     * @param amount
     * @return
     */
    int subtractBalance(@Param("userId") String userId, @Param("amount") int amount);
}
